import http from "@/api";

import { ResPage } from "@/api/interface";

import { MessageItemEntity, MessageItemVo } from "@/biz/interface/MessageType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取消息明细表列表
export const getMessageItemVoListApi = (params: {}) => {
  return http.post<ResPage<MessageItemVo>>(moduleUrl + `/cpymsg/ivvolist`, params);
};

// // * 新增消息明细表接口
// export const saveMessageItemApi = (messageItem: MessageItemEntity) => {
//   return http.post(moduleUrl + `/cpymsg/ivsave`, messageItem);
// };

// * 详情消息明细表接口
export const getMessageItemInfoApi = (params: { id: string }) => {
  return http.post<MessageItemEntity>(moduleUrl + `/cpymsg/ivinfo`, params);
};

// * 删除消息明细表接口
export const deleteMessageItemApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/cpymsg/ivdelete`, params);
};

// * 删除消息明细表接口
export const deleteMessagesApi = (params: { msgIds: string[] }) => {
  return http.post(moduleUrl + `/cpymsg/ivmtidelete`, params);
};
